package com.chry.ocr.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class MainController {

	@RequestMapping(value="/")
	public ModelAndView login(Model model){
		return new ModelAndView("login1");
	}
	@RequestMapping(value="/admin")
	public String adminPage(Model model,@RequestParam(value="username") String username,
			@RequestParam(value="password") String password){
		model.addAttribute("username",username);
		model.addAttribute("password",password);
		return "admin";
	}
}
